package dao.impl;

import dao.IMovieDao;
import entity.Movie;
import util.FileUtil;
import java.util.List;

public class MovieDaoImpl implements IMovieDao {
    private static final String FILE = "movies.dat";

    @Override
    public void save(List<Movie> movies) {
        FileUtil.writeList(movies, FILE);
    }

    @Override
    public List<Movie> load() {
        return FileUtil.readList(FILE);
    }
}